package the.workshop.bu.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wisteria.framework.web.APIResult;
import the.broccoli.uc.entity.User;
import the.broccoli.uc.service.IUserService;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/bu/sales/user")
public class SalesUserController {

    @Resource
    private IUserService userService;

    @GetMapping("/list")
    public APIResult<List<User>> listSalesUser() {
        return APIResult.success(userService.listByUserType("1"));
    }

}
